3.1438 \(\int (1+x)^m \left (1+2 x+x^2\right )^n \, dx\)

Optimal. Leaf size=26 \[ \frac{(x+1)^{m+1} \left (x^2+2 x+1\right )^n}{m+2 n+1} \]

[Out]

((1 + x)^(1 + m)*(1 + 2*x + x^2)^n)/(1 + m + 2*n)

_______________________________________________________________________________________

Rubi [A]  time = 0.0288343, antiderivative size = 26, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125 \[ \frac{(x+1)^{m+1} \left (x^2+2 x+1\right )^n}{m+2 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(1 + x)^m*(1 + 2*x + x^2)^n,x]

[Out]

((1 + x)^(1 + m)*(1 + 2*x + x^2)^n)/(1 + m + 2*n)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 4.49135, size = 22, normalized size = 0.85 \[ \frac{\left (x + 1\right )^{m + 1} \left (x^{2} + 2 x + 1\right )^{n}}{m + 2 n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1+x)**m*(x**2+2*x+1)**n,x)

[Out]

(x + 1)**(m + 1)*(x**2 + 2*x + 1)**n/(m + 2*n + 1)

_______________________________________________________________________________________

Mathematica [A]  time = 0.017362, size = 23, normalized size = 0.88 \[ \frac{(x+1)^{m+1} \left ((x+1)^2\right )^n}{m+2 n+1} \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + x)^m*(1 + 2*x + x^2)^n,x]

[Out]

((1 + x)^(1 + m)*((1 + x)^2)^n)/(1 + m + 2*n)

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 27, normalized size = 1. \[{\frac{ \left ( 1+x \right ) ^{1+m} \left ({x}^{2}+2\,x+1 \right ) ^{n}}{1+m+2\,n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1+x)^m*(x^2+2*x+1)^n,x)

[Out]

(1+x)^(1+m)*(x^2+2*x+1)^n/(1+m+2*n)

_______________________________________________________________________________________

Maxima [A]  time = 0.690025, size = 36, normalized size = 1.38 \[ \frac{{\left (x + 1\right )} e^{\left (m \log \left (x + 1\right ) + 2 \, n \log \left (x + 1\right )\right )}}{m + 2 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 2*x + 1)^n*(x + 1)^m,x, algorithm="maxima")

[Out]

(x + 1)*e^(m*log(x + 1) + 2*n*log(x + 1))/(m + 2*n + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.226368, size = 32, normalized size = 1.23 \[ \frac{{\left (x + 1\right )}^{m}{\left (x + 1\right )}^{2 \, n}{\left (x + 1\right )}}{m + 2 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 2*x + 1)^n*(x + 1)^m,x, algorithm="fricas")

[Out]

(x + 1)^m*(x + 1)^(2*n)*(x + 1)/(m + 2*n + 1)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1+x)**m*(x**2+2*x+1)**n,x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.214838, size = 57, normalized size = 2.19 \[ \frac{x e^{\left (m{\rm ln}\left (x + 1\right ) + 2 \, n{\rm ln}\left (x + 1\right )\right )} + e^{\left (m{\rm ln}\left (x + 1\right ) + 2 \, n{\rm ln}\left (x + 1\right )\right )}}{m + 2 \, n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x^2 + 2*x + 1)^n*(x + 1)^m,x, algorithm="giac")

[Out]

(x*e^(m*ln(x + 1) + 2*n*ln(x + 1)) + e^(m*ln(x + 1) + 2*n*ln(x + 1)))/(m + 2*n +
 1)